Index: /applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Lane.java
===================================================================
--- /applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Lane.java	(revision 26701)
+++ /applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Lane.java	(revision 26702)
@@ -67,35 +67,36 @@
     }
     
-    private static int getCount(Way w) {
-        final String countStr = w.get("lanes");
-        
-        if (countStr != null) {
-            try {
-                return Integer.parseInt(countStr);
-            } catch (NumberFormatException e) {
-                throw UnexpectedDataException.Kind.INVALID_TAG_FORMAT.chuck("lanes", countStr);
-            }
-        }
-        
-        throw UnexpectedDataException.Kind.MISSING_TAG.chuck("lanes");
-    }
-    
     static int getRegularCount(Way w, Node end) {
-        final int count = getCount(w);
+        final int count = Utils.parseIntTag(w, "lanes");
+        final boolean forward = w.lastNode().equals(end);
         
         if (w.hasDirectionKeys()) {
-            // TODO check for oneway=-1
-            if (w.lastNode().equals(end)) {
-                return count;
-            } else {
-                return 0;
-            }
+            return getRegularCountOneWay(w, forward, count);
         } else {
-            if (w.lastNode().equals(end)) {
-                return (count + 1) / 2; // round up in direction of end
-            } else {
-                return count / 2; // round down in other direction
-            }
-        }
+            return getRegularCountTwoWay(w, forward, count);
+        }
+    }
+    
+    private static int getRegularCountOneWay(Way w, boolean forward, final int count) {
+        if (forward ^ "-1".equals(w.get("oneway"))) {
+            return count;
+        } else {
+            return 0;
+        }
+    }
+    
+    private static int getRegularCountTwoWay(Way w, boolean forward, final int count) {
+        if (w.get("lanes:backward") != null) {
+            final int backwardCount = Utils.parseIntTag(w, "lanes:backward");
+            return forward ? count - backwardCount : backwardCount;
+        }
+        
+        if (w.get("lanes:forward") != null) {
+            final int forwardCount = Utils.parseIntTag(w, "lanes:forward");
+            return forward ? forwardCount : count - forwardCount;
+        }
+        
+        // default: round up in forward direction...
+        return forward ? (count + 1) / 2 : count / 2;
     }
     
Index: /applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Utils.java
===================================================================
--- /applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Utils.java	(revision 26701)
+++ /applications/editors/josm/plugins/turnlanes/src/org/openstreetmap/josm/plugins/turnlanes/model/Utils.java	(revision 26702)
@@ -20,8 +20,8 @@
 
 public class Utils {
-    private static final Set<String> ROAD_HIGHWAY_VALUES = Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(
-        "motorway", "motorway_link", "trunk", "trunk_link", "primary", "primary_link", "secondary", "secondary_link",
-        "tertiary", "residential", "unclassified", "road", "living_street", "service", "track", "pedestrian", "raceway",
-        "services")));
+    private static final Set<String> ROAD_HIGHWAY_VALUES = Collections.unmodifiableSet(new HashSet<String>(Arrays
+            .asList("motorway", "motorway_link", "trunk", "trunk_link", "primary", "primary_link", "secondary",
+                    "secondary_link", "tertiary", "residential", "unclassified", "road", "living_street", "service",
+                    "track", "pedestrian", "raceway", "services")));
     
     public static boolean isRoad(Way w) {
@@ -144,10 +144,10 @@
      * 
      * @param ways
-     *          ways to be ordered
+     *            ways to be ordered
      * @param nodes
-     *          start/end nodes
+     *            start/end nodes
      * @return
      * @throws IllegalArgumentException
-     *           if the ways can't be ordered
+     *             if the ways can't be ordered
      */
     public static List<Route> orderWays(Iterable<Way> ways, Iterable<Node> nodes) {
@@ -210,5 +210,5 @@
         for (Road r : via) {
             final Iterable<Route.Segment> segments = r.getRoute().getFirstSegment().getWay().isFirstLastNode(n) ? r
-                .getRoute().getSegments() : CollectionUtils.reverse(r.getRoute().getSegments());
+                    .getRoute().getSegments() : CollectionUtils.reverse(r.getRoute().getSegments());
             
             for (Route.Segment s : segments) {
@@ -223,3 +223,17 @@
         return result;
     }
+    
+    public static int parseIntTag(OsmPrimitive primitive, String tag) {
+        final String value = primitive.get(tag);
+        
+        if (value != null) {
+            try {
+                return Integer.parseInt(value);
+            } catch (NumberFormatException e) {
+                throw UnexpectedDataException.Kind.INVALID_TAG_FORMAT.chuck(tag, value);
+            }
+        }
+        
+        throw UnexpectedDataException.Kind.MISSING_TAG.chuck(tag);
+    }
 }
