COUNT() is an older SOQL function that was available prior to other aggregate functions. It returns an integer. If you use COUNT(fieldName) the result of the query will be a List instead.
COUNT() is equivalent to COUNT(*) in SQL. It return the total row count. COUNT(fieldName) only counts the number of non-null records. If you want to use COUNT(fieldName), the following code should work:
List<AggregateResult> result = [select count(Id) total from Account];
System.debug(result[0].get('total'));
For more about the difference between COUNT() and COUNT(fieldName) take a look at the documentation.