RE: Retrieve records (count) which are deactivated in specified month
Fot the existing records, you will have to choose one of the following options, based on how many records you have in inactive state already:
Option 1: Create a real time workflow (Suitable for upto 5000 records, run the workflow 20 times {20*250=5000})
You need to create an on-demand workflow and update fields like
Actiavted/Deactivated by= Modified by
Actiavted/deactivated on=Process (Execution time)
Option 2: Export existing inactive records and reimport (Suitable for 100,000 records)
Click on advanced find>>Add your query, status=inactive>> Edit columns, add activated/deactivated by+Activated/deactivated on+Modified by+Modified on>>click results>>click export to excel
In the downloaded excel, copy paste 'modified by' & 'modified on' to 'activated/deactivated by' & 'activated/deactivated on' respectively>>go to sales>>account>>import>>upload this list
Option 3: Create a custom job to achieve this