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

typedef long long ll;

int t, n, k;
char s[55];

int main()
{
	cin >> t;
	while (t -- )
	{
		scanf("%d%d", &n, &k);
		cin >> s + 1;
		int cnt = 0;
		int st, en;
		for (int i = 1; i <= n; i ++ ) 
		{
			if (s[i] == '*') ++ cnt;
		}	
		for (int i = 1; i <= n; i ++ ) 
		{
			if (s[i] == '*') 
			{
				st = i;
				break;
			} 
		}
		for (int i = n; i >= 1; i -- )
		{
			if (s[i] == '*') 
			{
				en = i;
				break;
			}
		}
		//cout << 'C' << st << ' '<< en << endl;
		//cout << 'A' << cnt << endl;
		int ans = 0, now = st + k;
		if (cnt == 1)
		{
			cout << '1' << endl;
			continue;	
		} 
		else if (cnt == 2)
		{
			cout << '2' << endl;
			continue;
		} 
		else 
		{
			while (now < en)
			{
				for (int i = now;; i -- )
					if (s[i] == '*')
					{
						now = i;
						ans ++;
						break;
					} 
				now += k;
			}
		}
		cout << ans + 2 << endl;
	}
	return 0;
}