Hi,
I'm not sure if this is possible because the Visualization profile doesn't expose the layer as a profile variable, only the current feature and it does not include the Data Access bundle. https://developers.arcgis.com/arcade/profiles/visualization/
It looks like you could provide this info in a popup using
var rec_count = Count(Filter($layer, "FIELD_NAME='"+$feature.FIELD_NAME+"'"))
return IIf(rec_count>1, true, false)
If your data is relatively static, I would store this info in a new field.
Jill