Q:

PHP 'Count' displaying multiple '1's and not a total value

I am calling data from an SQL database in PHP, and I want to be able to count the number of specific values I am pulling from the database, I can pull a specific value, and get say 20 values, when I try to get the 'Count' of these values, it'll display 20 '1's so "11111111111111111111" rather than "20".
I have tried printing it, and entering it into a table, and neither produce the result I want.
My code below:
date_default_timezone_set('Europe/London');
$conn = new mysqli("xxx.xxx.xxx","title","password","title");
if (!$con){
    {exit("Connection Failed: " . $con);}
    //Connecting to the (DB) Database
}

<?php
if (isset($_POST['submit'])){
?>
<table>
<tr><td><strong>Count</strong></td></tr>
<?php
$start=$_POST['start'];
$end=$_POST['end'];

$sql="SELECT Data.Items ".
//Selecting the required data from the table
$sql="FROM Data ";
//Selecting FROM the Table(s) required

$reports = $con->query($sql);

while ($report = $reports->fetch_object()){
    $result = count ($report->Items);

    echo count ($result);

    echo "<tr><td>".$report->Items."</td></tr>";
}

?>

A:

Its because you are using the count function inside a loop as you fetch each row. Each row has got 1 item(which is not even an array). You have to use 
echo $reports->num_rows; 

before the while loop instead.

