Added query for unique pHash count
Fixed prepared statements re-created on each call