Does it stall while driving or just when you come to a stop such as a stop light? If it stalls while driving, a common cause is the camshaft position sensor. If it only stalls when stopping in traffic, and the problem just started after the battery was replaced, you just have to drive it. The Engine Computer loses its memory when the battery is disconnected, and won't know when it must be in control of idle speed until it relearns "minimum throttle". To meet the conditions for that to take place, drive at highway speed with the engine warmed up, then coast for at least seven seconds without touching the brake or gas pedals.