use data-id as default id
handle negative count properly during initialization