How to obtain number of publications by year on a given subject?
ISI Journal Citation Reports
ISI Journal citation reports might give you some useful information (your university may have a subscription).
It allows you to browse citation reports by subject category (i.e., discipline).  It includes things like impact factor, total counted citations, total articles in the focal year.
You can then click &quot;view journal summary list&quot; which will give you an overview.
For example, here is sample output for psychology in the 2013 JCR:

Of course, this only includes articles in journals indexed by ISI.
Publish or Perish Software
More generally, you might want to check out Publish or Perish. It is free software for Windows and OSX that provides a way of searching Google Scholar particularly suited to bibliometric analysis.