Please do not use scan method of dynamoDb because it read all data of tabel but in this case u need only count so use this .
$scan_response = $dynamodb->describeTable(array(
'TableName' => 'ProductCatalog' ));
and print this for result $scan_response['Table']['ItemCount']