// Problem: B. Partial Replacement
// Contest: Codeforces - Codeforces Round #710 (Div. 3)
// URL: https://codeforces.com/contest/1506/problem/B
// Memory Limit: 256 MB
// Time Limit: 2000 ms

//code by: Ravi Khatri 
#include<bits/stdc++.h>
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define F first
#define S second
#define pb push_back
#define f(i,s,n) for(int i=(int)s;i<=(int)n;++i)
#define fr(i,n,s) for(int i=(int)n;i>=s;--i)
#define all(v) v.begin(),v.end()
#define sz(v) (int)v.size()
#define Fast ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
using namespace std;
#define mod 1000000007

void solve()
{
	int n,k;cin>>n>>k;
	string s;cin>>s;
	int cnt=1;
	int p=0,j=n-1;
	for(int i=0;i<n;++i){
		if(s[i]=='*'){
			p=i;
			break;
		}
	}
	while(true){
		int f=0;
		for(int i=min(n-1,p+k);i>p;--i){
			if(s[i]=='*'){
				++cnt;
				p=i;	
				f=1;
				break;
			}
		}
		if(f==0)break;
	}
	cout<<cnt<<"\n";
}
int main()
{	Fast;
	int t;cin>>t;
	while(t--)
	solve();
}