#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long

int main(){
 
#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif
 
    IOS;
    int t;
    cin >> t;
    while(t--){
        int n,k;
        cin >> n >> k;
        string s;
        cin >> s;
        int nxt;
        for(int i=0; i<s.size(); i++){
            if(s[i]=='*'){
                nxt = i;
                break;
            }
        }
        int last = 0;
        for(int i=s.size()-1; i>=0; i--){
            if(s[i]=='*'){
                last = i;
                break;
            }
        }
        int cnt = 1;
        for(int i=nxt; i<=last; i++){
            if (s[i] == '*'){
                for (int j = min(i+k, n-1); j>=(i+1); j--) {
                    if (s[j] == '*') {
                        cnt ++;
                        i = j-1;
                        break;
                    }
                }
            }
        }
        cout << cnt <<endl;  
    }
}
