I have an object Card and has properties/fields name, id, date, number. How to find the number of non null fields. That is the number of fields that have been set. I do not have the list of functions or don't want to go down that road.
Eg:
card.setName("abc");
I want the count to be 1 because only name is set.