If we want to show the total number of bed files in each bedset in the bedset query results table, that's the only way to get the number for now.
Maybe we want that to be pre-computed and stored in the database with the bedset metadata... Or, create a separate endpoint that counts it with COUNT on the back-end. You are correct that retrieving them all, and then counting them is the Wrong Way™.
Maybe we want that to be pre-computed and stored in the database with the bedset metadata... Or, create a separate endpoint that counts it with COUNT on the back-end. You are correct that retrieving them all, and then counting them is the Wrong Way™.
Originally posted by @nsheff in https://github.com/databio/bedhost-ui/issues/9#issuecomment-782524497