#define fastIO() ios::sync_with_stdio(false); \
                 cin.tie(nullptr), cout.tie(nullptr);
#define rep(i, a, b) for (int i = a; i <= b; ++i)
#define rep2(i, a, b) for (int i = a; i < b; ++i)
#define per(i, a, b) for (int i = a; i >= b; --i)
#include <bits/stdc++.h>
using namespace std;
char s[55];
signed main(int argc, char *argv[]) { //fastIO();
    int T;
    cin >> T;
    while (T--) {
        int n, k;

        
        cin >> n >> k >> s + 1;


        int l, r;


        for (int i = 1; i <= n; ++i)
            if (s[i] == '*') {


                s[i] = 'X';
                l = i;
                break;
            }


        for (int i = n; i >= 1; --i)


            if (s[i] == '*' || s[i] == 'X') {


                s[i] = 'X';
                r = i;
                break;


            }
for (int i = l; i < r; ) {
    int pos;
    for (int j = i + 1; j <= i + k; ++j)
        if (s[j] == '*' || s[j] == 'X') pos = j;
    s[pos] = 'X';
    i = pos;
}
int ans = 0;
for (int i = 1; i <= n; ++i) ans += s[i] == 'X';
cout << ans << '\n';
    }
    //system("pause");
    return 0;
}