Hi nader,
Since you're already writing a plugin, then it may just be easiest to declare the Markdown language, claim the .md file extension, and make your count as part of the basic metrics calculation.
That said, since you appear to be analyzing with Maven, you'll still face the problem of how to find .md files in project root. For that, you'll need to override the value of sonar.sources, which Maven automatically sets for you, I believe to src/main.
For that matter, you could override sonar.sources (-Dsonar.sources=... on the command line) while pursuing your current route, but declaring a new language is probably the more "correct" (though costlier) way to go about it.
HTH,
Ann