#include<bits/stdc++.h>
using namespace std;

#define sp     ' '
#define endl   '\n'
#define F      first
#define S      second
#define mp     make_pair
#define pb     push_back
#define mt     make_tuple
#define PI     (2 * acos(0))
#define all(x) x.begin(), x.end()
#define spc(x) cout<<fixed<<setprecision(x)

void solve()
{
    long long t,m,n,a,b,c,d,g,i,j,k,x,y,z,cnt=0,cnt1=0;
    bool flag= false, flag1 = false; string s,s1;
	
    cin >> n >> k ;
    cin >> s;
    for(i=0;i<n;i++)
    {
    	if(s[i]=='*')
    	{
    		cnt++;
    		s[i]='x' ;	
    		break ;
    	}
    }
    for(j=n-1;j>i;j--)
    {
    	if(s[j]=='*')
    	{
    		cnt++;
    		s[j]='x' ;	
    		break;
    	}
    }
    
    for(i=0;i<n-1;i++)
    {
    	for(j=i;j<(i+k) and j<n ;j++)
    	{
    		if(s[j]=='*') {flag1 = true;m=j;}
    		if(s[j]=='x') {flag=true;break ;}
    	}
    	if(!flag and flag1) 
    	{
    		cnt++;
    		s[m]='x' ;
    	}
    	flag = false ;
    	flag1 = false ;
    }
    cout << cnt << endl ;
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);    cout.tie(NULL);

    int32_t tc;
    cin>>tc;
    while(tc--)

    solve();

    return 0;
}