Fix: numFields wrong for sqlite

Currently the first row of the result
is used to return the number of fields.
This fix corrects that calculation, which has returned
twice the number of fields before. The reason for that
was that the resulting data array has the following form:
array() {
 [0] => value_0
 ["field_name0"] =>value_0
 [1] => value_1
 ["field_name1"] =>value_1
...
Furthermore the constant 0 (int) is returned if the result
set is empty. This issue should be corrected in the future,
since the number or fields should be answered in a metadata context
independent of the data stored in the relation.

Bug: 65578
Change-Id: I399c7c857dcbd774cc4eb6102bbfe8a8764b07c9
Merge "Fix: numFields wrong for sqlite"