From Salesforce documentation:
You can’t use long text area, multi-select picklist, Description fields, system fields like Last Activity, cross-object formula fields, and lookup fields in the field column of roll-up summary filters.
So what you want is not natively possible in Salesforce.
You can use this workaroud.
Create a new field on you child object named as "Duplicate Lookup Text" of type Text
Create a Workflow Rule, Created and Edited to subsequently meet the criteria, and criteria being the Lookup Field is not null
Create a Rollup- Summary on Parent Object for Count and use the filter criteria as Duplicate Lookup Text is not null
3)Create a Rollup- Summary on Parent Object for Count and use the filter criteria as Duplicate Lookup Text is not null
Voila Done.
Src: https://help.salesforce.com/articleView?id=fields_about_roll_up_summary_fields.htm&type=5