sqlite3_data_countreturns the number of values (columns) of the current executable statement. With no results, it returns 0.
sqlite3_column_countOn the other hand, it always returns the number of columns with or without results.
Which one you will use depends on whether you need to get the number of columns or not.