Adss mapping to count the matches for the current pattern