How to extract data from Wikipedia for a specific category like Person?
If you want an SQL solution, you can find the articles of a category by searching up rows in categorylinks.sql where cl_to=category_title. It gives all the page ids of the subcategories, articles. Then you can count all the rows where cl_type='subcat' to find the number of subcategories. cl_type='page' give the number of pages.
To find the corresponding title of the articles or the categories, you can use page.sql.
An alternative way is to just get the category.sql dump. It has the number of subcategories and articles of each category.
The actual names of the dumps in the latest enwiki dumps would be:

enwiki-latest-categorylinks.sql
enwiki-latest-page.sql
I want to extract articles from Wikipedia belonging to a specific category,for example company or person. Is there a good way to do this? Right now, I have a wikipedia data dump from which I can extract the page content, but I can't filter the data based on category. Also, can I get an exact number of articles from the wikipedia dump for the given category?