#include<bits/stdc++.h>

using namespace std;
#define ll long long
#define pb push_back
#define mp make_pair
#define F first
#define S second

void solve(){
    int n,k;
    cin>>n>>k;
    string s; cin>>s;
    vector<int> v;
    for(int i=0;i<n;i++){
        if(s[i]=='*') v.pb(i);
    }
    int ans=1;
    if(v.size()==1){
        cout<<1<<endl;
        return;
    }
    int l=v.size();
    if(v[l-1]-v[0]<=k){
        cout<<2<<endl;
        return;
    }
    int i=0;
    while(i<l){
        int j=i;
        while(i<l&&v[i]-v[j]<=k) i++;
        if(i!=l) i--;
        ans++;
    }
    cout<<ans<<endl;
}
int main(){
    ios::sync_with_stdio(0); cin.tie(0);
    int t; cin>>t;
    while(t-->0){
        solve();
    }

}
