It turns out that in the latter the count returns zero even though the second app shows items in the list.
I've been told that I might need to share contexts between apps, but how do I do that?
EDIT: Have already left in the comments that this is not the best option, then how to access database data from another app?