Count number of entries in sqlite3 database tables

## Usage

``bike_db_totals(bikedb, trips = TRUE, city)``

## Arguments

bikedb

A string containing the path to the SQLite3 database.

trips

If true, numbers of trips are counted; otherwise numbers of stations

city

Optional city for which numbers of trips are to be counted

## Examples

``````if (FALSE) {
data_dir <- tempdir ()
bike_write_test_data (data_dir = data_dir)
bikedb <- file.path (data_dir, 'testdb')
# latest_lo_stns is set to FALSE just to avoid download on CRAN; this should
# normally remain at default value of TRUE:
store_bikedata (data_dir = data_dir, bikedb = bikedb, latest_lo_stns = FALSE)
# create database indexes for quicker access:
index_bikedata_db (bikedb = bikedb)

bike_db_totals (bikedb = bikedb, trips = TRUE) # total trips
bike_db_totals (bikedb = bikedb, trips = TRUE, city = 'ch')
bike_db_totals (bikedb = bikedb, trips = TRUE, city = 'ny')
bike_db_totals (bikedb = bikedb, trips = FALSE) # total stations
bike_db_totals (bikedb = bikedb, trips = FALSE, city = 'ch')
bike_db_totals (bikedb = bikedb, trips = FALSE, city = 'ny')
# numbers of stations can also be extracted with
nrow (bike_stations (bikedb = bikedb))
nrow (bike_stations (bikedb = bikedb, city = 'ch'))

bike_rm_test_data (data_dir = data_dir)
bike_rm_db (bikedb)
# don't forget to remove real data!
# file.remove (list.files ('.', pattern = '.zip'))
}
``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.64029545,"math_prob":0.9686002,"size":1428,"snap":"2023-14-2023-23","text_gpt3_token_len":396,"char_repetition_ratio":0.2008427,"word_repetition_ratio":0.16744186,"special_character_ratio":0.27450982,"punctuation_ratio":0.1388889,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9889615,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-03-21T10:41:00Z\",\"WARC-Record-ID\":\"<urn:uuid:14029ff1-621d-4c83-9c8a-4289ad4e8d6b>\",\"Content-Length\":\"17896\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b035ce74-e042-4322-8042-dfabe5e490b0>\",\"WARC-Concurrent-To\":\"<urn:uuid:d2137d79-9233-43e2-95a4-aed4ab169d50>\",\"WARC-IP-Address\":\"104.21.5.184\",\"WARC-Target-URI\":\"https://docs.ropensci.org/bikedata/reference/bike_db_totals.html\",\"WARC-Payload-Digest\":\"sha1:SLLBUWNJBYFC3VFCO2HKIGJ5HJNIGYLN\",\"WARC-Block-Digest\":\"sha1:4NISGSZRGGKJVDQ4U6X5L5WPEFQZLRZ3\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-14/CC-MAIN-2023-14_segments_1679296943695.23_warc_CC-MAIN-20230321095704-20230321125704-00440.warc.gz\"}"}