Resolved by using Script task with following code:
Option Strict Off
Imports System
Imports System.Data
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Public Class ScriptMain
Public Sub Main()
Dts.Variables("User::Count").Value = Dts.Variables("User::Count").Value + 1
MsgBox(Dts.Variables("User::Count").Value.ToString())
Dts.TaskResult = Dts.Results.Success
End Sub
End Class
Then placed a precedence constraint to check the variable