#include<iostream>
#include<string>

using namespace std;

int minX(string s, int start, int end, int k){
	if(start ==end)
	return 1;
	else if(end - start <=k)
	return 2;
	int count =1;
	int next;
	while(start !=end){
	for(int i=start+1;i<start + k+1 && i<=end;i++){
		if(s[i]=='*'){
			next = i;
		}
	}
	start = next ;
	count++;
	}
	return count;
}
int main(){
	int t;
	cin>>t;
	while(t--){
		int n,k;
		cin>>n>>k;
		string s;
		cin>>s;
		int start =-1,end =-1;
	for(int i=0;i<n;i++){
		if(s[i]=='*'){
			if(start!=-1){
				end = i;
			}
			else{
				start = i;
				end = i;
			}
		}
	}
		cout<<minX(s,start,end, k)<<endl;
	}
	return 0;
}