We may be able to claim our grandkids. Are government benefits such as food stamps, medicaid, cash assistance, etc included in calculating the support of dependents?

We are considering whether we can claim our grandkids as dependents.  The grandkids lived with us for more than half of the year but their mother (our daughter) did not.  She doesn't work so our income is higher than hers.  We don't know how to calculate whether we provided more than half of the support of the kids.  Our daughter receives food stamps, medicaid for the kids, cash assistance from the state, and heating assistance based on the size of her family.  (That might be another issue.)   Do all these benefits count in the calculation of what it cost to support the kids?  Does our contribution to the support of the kids have to match the value of those benefits and then exceed what our daughter paid for their support?  Is there a standard number of what it typically costs to support a kid?