Checking for changed fields - Identifying an empty array & Field Type This is probably a simple question, but I am not finding it right away. I have a mostly working function to check for changed fields in a form. Here is the snippet checking for change:

// Check the number of values for each field, or if they are populated at all.
$old_field_count = (isset($old_field[LANGUAGE_NONE]) ? count($old_field[LANGUAGE_NONE]) : 0);
$new_field_count = (isset($new_field[LANGUAGE_NONE]) ? count($new_field[LANGUAGE_NONE]) : 0);


The problem I am a having is when I submit the form, empty text fields always respond as changed. The $old_field_count is not set, so comes up as 0. The $new_field_count is 1, because for some reason it is an empty array. 

old count 0
new count 1 ... (Array, 1 element)
    0 (Array, 1 element)
        value (String, 0 characters )


There has to be an easy way to say "If ($new_field_count = "An empty Array") {$new_field_count = 0;}"

Edit: I found my answer in part. I tried If (empty($new_field_count[0])) {$new_field_count = 0;} but that just breaks any empty field that isn't a text field. So now I am thinking I have to additionally identify if it is a text field.
Thanks, I've got it! 

// Check the number of values for each field, or if they are populated at all.
$old_field_count = (isset($old_field[LANGUAGE_NONE]) ? count($old_field[LANGUAGE_NONE]) : 0);
$new_field_count = (isset($new_field[LANGUAGE_NONE]) ? count($new_field[LANGUAGE_NONE]) : 0);

If (empty($new_field[LANGUAGE_NONE][0]['value'] &amp;&amp; ($field_info[type] == 'text' || $field_info[type] == 'text_long')) {
    $new_field_count = 0;
}

if ($old_field_count != $new_field_count) {
  // The two versions have a different number of values. Something has changed.
  $fields_changed[] = $field_name;
}