просто добавете DISTINCT
SELECT COUNT(DISTINCT profile_id) totalCOUNT FROM ptb_profile_views...
и повторете псевдонима,
$views['totalCOUNT']
просто добавете DISTINCT
SELECT COUNT(DISTINCT profile_id) totalCOUNT FROM ptb_profile_views...
и повторете псевдонима,
$views['totalCOUNT']