def record_param_count(parent=None, new_value=None, **kwargs):
    """Size getter/setter for the record parameters array element count."""
    if parent is None:
        raise KeyError('Cannot get/set the size of record parameter ' +
            'array without a supplied parent.')
    if new_value is None:
        return (parent.size - 3) * 2
    assert not new_value % 2, 'record byte sizes must be a multiple of 2.'
    parent.size = 3 + new_value // 2
