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

int main() {
    ll T,N,K,i,j,k,l,ans;
    string S;
    cin>>T;
    while (T--)
    {
        cin>>N>>K;
        cin>>S;
        ans=1;
        for(i=0;S[i]!='*';i++);
        for(j=S.length()-1;S[j]!='*';j--);
        if(i!=j)
        {
            ans++;
        }
        for(k=i+1;k<=j;k++)
        {
            if(k-i>K)
            {
                ans++;
                i=l;
            }
            if(S[k]=='*')
            {
                l=k;
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}